-- GENERATED SPELL FOR [Sylvanaar Ancient Protector] --


function spell0_20126(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(11922,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20126', 16500, 1)
end

function spell1_20126(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(45,pUnit)
pUnit:RegisterEvent('Sorts_20126', 567, 1)
end

function Sorts_20126(pUnit, Event)
local choix_sorts_20126 = math.random(0, 1)
if choix_sorts_20126 == 0 then
pUnit:RegisterEvent('spell0_20126', 1, 1)
end
if choix_sorts_20126 == 1 then
pUnit:RegisterEvent('spell1_20126', 1, 1)
end
end

function mob20126_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20126', math.random(1500, 3000), 1)
end

function mob20126_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20126_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20126_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20126, 1, 'mob20126_Action')
RegisterUnitEvent(20126, 2, 'mob20126_Leave')
RegisterUnitEvent(20126, 3, 'mob20126_Kill')
RegisterUnitEvent(20126, 4, 'mob20126_Die')
